'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH TXTRECORDCREATE 3DNS_SD "Aug 20, 2007"
.SH NAME
TXTRecordCreate, TXTRecordDeallocate, TXTRecordSetValue, TXTRecordRemoveValue,
TXTRecordGetLength, TXTRecordGetBytesPtr, TXTRecordContainsKey,
TXTRecordGetValuePtr, TXTRecordGetCount, TXTRecordGetItemAtIndex \- DNS TXT
record manipulation functions
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-ldns_sd\fR [ \fIlibrary\fR ... ]
#include <dns_sd.h>

\fBvoid\fR \fBTXTRecordCreate\fR(\fBTXTRecordRef\fR *\fItxtRecord\fR, \fBuint16_t\fR \fIbufferLen\fR,
     \fBvoid\fR *\fIbuffer\fR);
.fi

.LP
.nf
\fBvoid\fR \fBTXTRecordDeallocate\fR(\fBTXTRecordRef\fR*\fItxtRecord\fR);
.fi

.LP
.nf
\fBDNSServiceErrorType\fR \fBtxtRecord\fR(\fBTXTRecordRef\fR *\fItxtRecord\fR,
     \fBconst char\fR *\fIkey\fR, \fBuint8_t\fR \fIvalueSize\fR, \fBconst void\fR *\fIvalue\fR);
.fi

.LP
.nf
\fBDNSServiceErrorType\fR \fBTXTRecordRemoveValue\fR(\fBTXTRecordRef\fR *\fItxtRecord\fR,
     \fBconst char\fR *\fIkey\fR);
.fi

.LP
.nf
\fBuint16_t\fR \fBTXTRecordGetLength\fR(\fBconst TXTRecordRef\fR *\fItxtRecord\fR);
.fi

.LP
.nf
\fBconst void\fR *\fBTXTRecordGetBytesPtr\fR(\fBconst TXTRecordRef\fR *\fItxtRecord\fR);
.fi

.LP
.nf
\fBint\fR *\fBTXTRecordContainsKey\fR(\fBuint16_t\fR *\fItxtLen\fR,
     \fBconst void\fR *\fItxtRecord\fR, \fBconst char\fR *\fIkey\fR);
.fi

.LP
.nf
\fBconst void\fR *\fBTXTRecordGetValuePtr\fR(\fBuint16_t\fR *\fItxtLen\fR,
     \fBconst void\fR *\fItxtRecord\fR, \fBconst char\fR *\fIkey\fR,
     \fBuint8_t\fR *\fIvalueLen\fR);
.fi

.LP
.nf
\fBuint16_t\fR *\fBTXTRecordGetCount\fR(\fBuint16_t\fR *\fItxtLen\fR,
     \fBconst void\fR *\fItxtRecord\fR);
.fi

.LP
.nf
\fBDNSServiceErrorType\fR \fBTXTRecordGetItemAtIndex\fR(\fBuint16_t\fR *\fItxtLen,\fR
     \fBconst void\fR *\fItxtRecord\fR, \fBuint16_t\fR *\fIindex\fR,
     \fBuint16_t\fR *\fIkeyBufLen\fR, \fBchar\fR *\fIkey\fR,
     \fBuint8_t\fR *\fIvalueLen\fR, \fBconst void\fR **\fIvalue\fR);
.fi

.SH DESCRIPTION
.sp
.LP
These functions in the \fBlibdns_sd\fR library allow applications to create and
to manipulate \fBTXT\fR resource records. \fBTXT\fR resource records enable
applications to include service specific information, other than a host name
and port number, as part of the service registration.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for description of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR attributes (7)
